<?php
/* * *************************************************************************
 *
 *
 * ************************************************************************* */

function AuctionTheme_my_account_area_function() {
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>	
    <div id="content">
        <?php
        if (AuctionTheme_is_able_to_post_auctions()):
            ?>
            <div class="my_box3">
                <div class="padd10">  
                    <div class="top-my"> 
                        <ul>
                            <li><input type="button" value="CompatipleParts" class="bta"></li>
                            <li><input type="button" value="New" class="bta"></li>
                              <li>
                                    <?php
                        if (AuctionTheme_check_if_pid_is_in_watchlist(get_the_ID(), $uid) == true):
                            ?>

                            <a class="rem-to-watchlist" rel="<?php the_ID(); ?>"  href="#"><input type="button" value="<?php _e('UFollow', 'AuctionTheme'); ?>" class="bta"></a>

                        <?php else: ?>

                            <a class="add-to-watchlist" rel="<?php the_ID(); ?>" href="#"><input type="button" value="<?php _e('Follow', 'AuctionTheme'); ?>" class="bta"></a>
                        <?php endif; ?> 
                              </li>
                        </ul>
                        
                        </div>

                    <div class="box_content"> 


                        <?php
                        query_posts("meta_key=closed&meta_value=0&post_type=auction&order=DESC&orderby=id&author=" . $uid . "&posts_per_page=1");

                        if (have_posts()) :
                            while (have_posts()) : the_post();
                                auctionTheme_get_post();
                            endwhile;
                        else:

                            _e("There are no auctions yet.", 'AuctionTheme');

                        endif;

                        wp_reset_query();
                        ?>

                    </div>
                </div>
            </div>

            <div class="clear10"></div>
        <?php endif; ?>


        <!-- ##################### -->   

    </div>


    <?php
    //auctionTheme_get_users_links();
}
?>